let oIpt = document.querySelectorAll('article input');
console.log(oIpt);
let regBtn = document.querySelector('.bTns');
regBtn.onclick = function() {
    // console.log(111);
    if (oIpt[0].value || oIpt[1].value != '') {
        axios.post(loginApi, {
            "password": oIpt[1].value,
            "loginCount": oIpt[0].value
        }).then(res => {
            console.log(res);
            if (res.data.code == 0) {
                // console.log(res.config.data.loginCount)
                Cookies.set('loginCount', oIpt[0].value, 7);
                Cookies.set('info', res.data.info, 7);
                Cookies.set('password', oIpt[1].value, 7);
                alert('登录成功');
                location.href = 'recommend.html';
            } else {
                alert('请注册');
                location.href = 'register.html';
            }
        })
    } else {
        alert('输入不能为空');
    }
    // oIpt[0].value = '';
    // oIpt[1].value = '';
}